<?php

 	/*** include the controller class ***/
 	include __SITE_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR. 'core' . DIRECTORY_SEPARATOR . 'controller_base.php';

 	/*** include the registry class ***/
 	include __SITE_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'registry.php';

 	/*** include the router class ***/
 	include __SITE_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR .'core' . DIRECTORY_SEPARATOR. 'router.php';
	
 	/*** include the template class ***/
 	include __SITE_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'template.php';

 	/*** auto load model classes ***/
    function __autoload($class_name) 
    {
    	$filename = strtolower($class_name) . '.class.php';
    	$file = __SITE_PATH . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR . $filename;

    	if (file_exists($file) == false)
    	{
        	return false;
    	}
  		
    	include ($file);
	}

 	/*** a new registry object ***/
 	$registry = new Registry();

 	/*** create the database registry object ***/
	$registry->db = new Mysqli('127.0.0.1', 'tecnicosya_usr', 'tecnicosya_usr', 'tecnicosya');
?>
